8.8
HIGH CVSS 3.1
CVE-2022-23642
Code Injection in Sourcegraph
Description

Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the `gitserver` service. The service acts as a git exec proxy, and fails to properly restrict calling `git config`. This allows an attacker to set the git `core.sshCommand` option, which sets git to use the specified command instead of ssh when they need to connect to a remote system. Exploitation of this vulnerability depends on how Sourcegraph is deployed. An attacker able to make HTTP requests to internal services like gitserver is able to exploit it. This issue is patched in Sourcegraph version 3.37. As a workaround, ensure that requests to gitserver are properly protected.

INFO

Published Date :

Feb. 18, 2022, 11:15 p.m.

Last Modified :

Nov. 21, 2024, 6:49 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2022-23642 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Sourcegraph sourcegraph
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 2.0 MEDIUM [email protected]
CVSS 3.1 HIGH [email protected]
CVSS 3.1 HIGH [email protected]
Public PoC/Exploit Available at Github

CVE-2022-23642 has a 8 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-23642 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

All CVE - PoC in GitHub

poc proofofconcept tester allcve cvegithub cvenew cvepoc cveupdate

Updated: 3 months ago
12 stars 3 fork 3 watcher
Born at : March 22, 2024, 3:58 p.m. This repo has been linked 931 different CVEs too.

None

Updated: 2 months, 2 weeks ago
2 stars 0 fork 0 watcher
Born at : March 11, 2024, 1:21 p.m. This repo has been linked 935 different CVEs too.

None

Updated: 2 years, 5 months ago
0 stars 2 fork 2 watcher
Born at : April 8, 2023, 6:19 a.m. This repo has been linked 928 different CVEs too.

None

Updated: 1 year, 6 months ago
20 stars 3 fork 3 watcher
Born at : Feb. 14, 2023, 6:10 p.m. This repo has been linked 921 different CVEs too.

None

Updated: 3 months, 2 weeks ago
2 stars 2 fork 2 watcher
Born at : Nov. 25, 2022, 5:43 p.m. This repo has been linked 935 different CVEs too.

PoC for Sourcegraph Gitserver < 3.37.0 RCE (CVE-2022-23642)

Python

Updated: 1 year ago
7 stars 2 fork 2 watcher
Born at : June 10, 2022, 6:12 a.m. This repo has been linked 1 different CVEs too.

test 反向辣鸡数据投放 CVE-2022-23305 工具 利用 教程 Exploit POC

cve-2020-

Updated: 8 months ago
5 stars 3 fork 3 watcher
Born at : Jan. 21, 2022, 5:07 a.m. This repo has been linked 2650 different CVEs too.

🍆 My GitHub Profile

Go JavaScript

Updated: 2 days, 1 hour ago
5 stars 6 fork 6 watcher
Born at : July 10, 2020, 10:24 a.m. This repo has been linked 6 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-23642 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-23642 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html
    Added Reference http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html
    Added Reference https://github.com/sourcegraph/sourcegraph/pull/30833
    Added Reference https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Reanalysis by [email protected]

    Jun. 27, 2023

    Action Type Old Value New Value
    Added CWE NIST CWE-862
  • Modified Analysis by [email protected]

    Oct. 29, 2022

    Action Type Old Value New Value
    Changed Reference Type http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html No Types Assigned http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html Exploit, Third Party Advisory, VDB Entry
    Changed Reference Type http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html No Types Assigned http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html Exploit, Third Party Advisory, VDB Entry
  • CVE Modified by [email protected]

    Jul. 13, 2022

    Action Type Old Value New Value
    Added Reference http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html [No Types Assigned]
  • CVE Modified by [email protected]

    Jun. 20, 2022

    Action Type Old Value New Value
    Added Reference http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html [No Types Assigned]
  • Initial Analysis by [email protected]

    Mar. 07, 2022

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:M/Au:S/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/sourcegraph/sourcegraph/pull/30833 No Types Assigned https://github.com/sourcegraph/sourcegraph/pull/30833 Patch, Third Party Advisory
    Changed Reference Type https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 No Types Assigned https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 Patch, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:sourcegraph:sourcegraph:*:*:*:*:*:*:*:* versions up to (excluding) 3.37
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 8.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 6
Access Vector
Access Complexity
Authentication
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

83.47 }} -0.81%

score

0.99232

percentile